﻿using System;
using fastCSharp;

namespace diantou.web.ajax
{
    /// <summary>
    /// 题目操作
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class problem : userHandle<problem>
    {
        /// <summary>
        /// 获取题解报告
        /// </summary>
        /// <param name="problemId"></param>
        /// <param name="onReturn"></param>
        [fastCSharp.code.cSharp.ajax(IsOnlyPost = false)]
        public string GetSolution(int problemId)
        {
            return diantou.dataAccess.tcpCall.problem.getSolution(problemId, currentUser.Id).Value ? diantou.dataAccess.clientCache.Problem[problemId].Solution : null;
        }
    }
}